/*********************************************************************
* File: IHearing.h
*
* Supports agent's hearing.
*********************************************************************/
#pragma once

#include "../globals.h"

namespace agents{namespace interfaces{
	/**
	* \class IHearing
	* \brief Supports agent's hearing.
	*
	* Simulates hearing the sounds in the game. Presently, only supports
	* hearing the bomb ticking.
	*
	* \author Instituto Superior Tecnico de Lisboa, Portugal
	* \author Technical University of Lisbon, Portugal
	* 
	* \author Agentes Autonomos e Sistemas Multiagente
	* \author Autonomous Agents and Multiagent Systems
	* 
	* \version	1.0
	* \date		2006/2007
	**/
	class IHearing
	{
	public:
		/**
		* \brief Whether the agent can hear the bomb.
		*
		* Hearing distance varies according to elapsed time since bomb was 
		* planted as follows:
		* - if elapsed time in ]0, 15[ secs, hears if distance is in [0, 650[
		* - if elapsed time in [15, 22.5[ secs, hears if distance is in [0, 1000[
		* - if elapsed time in [22.5, 40[ secs, hears if distance is in [0, 2000[
		* - if elapsed time in > 40 secs, always hears
		* If can hear the bomb, than the direction of the sound is also provided.
		*
		* \param[out] direction The sound direction.
		**/
		virtual bool hearsBomb(Vector* direction) = 0;
	};
}}
